﻿// CDlgAlarm.cpp: 实现文件
//

#include "stdafx.h"
#include "MesTest.h"
#include "CDlgAlarm.h"
#include "afxdialogex.h"


// CDlgAlarm 对话框

IMPLEMENT_DYNAMIC(CDlgAlarm, CDialogEx)

CDlgAlarm::CDlgAlarm(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_DIALOG_ALARM, pParent)
{
	m_Mes = "";
}

CDlgAlarm::~CDlgAlarm()
{
}

void CDlgAlarm::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_STATIC_WARNMESSAGE, m_Static_AlarmMessage);
}


BEGIN_MESSAGE_MAP(CDlgAlarm, CDialogEx)
END_MESSAGE_MAP()


// CDlgAlarm 消息处理程序
BOOL CDlgAlarm::OnInitDialog()
{
	CDialogEx::OnInitDialog();
	Font.CreateFontA(35, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS
		, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, "华文雅黑");
	m_Static_AlarmMessage.SetBkColor(RGB(255, 0, 0), RGB(0, 0, 0), CStaticExt::Normal);
	GetDlgItem(IDC_STATIC_WARNMESSAGE)->SetFont(&Font);
	CString mes;
	mes.Format("警告:%s", m_Mes);
	SetDlgItemTextA(IDC_STATIC_WARNMESSAGE, mes);

	return TRUE;
}